import request from "../../util/request"

// 查询存储部门信息列表
export function listDepartments(query) {
  return request({
    url: '/system/departments/list',
    method: 'get',
    params: query
  })
}

// 查询存储部门信息详细
export function getDepartments(DepartmentID) {
  return request({
    url: '/system/departments/' + DepartmentID,
    method: 'get'
  })
}

// 新增存储部门信息
export function addDepartments(data) {
  return request({
    url: '/system/departments',
    method: 'post',
    data: data
  })
}

// 修改存储部门信息
export function updateDepartments(data) {
  return request({
    url: '/system/departments',
    method: 'put',
    data: data
  })
}

// 删除存储部门信息
export function delDepartments(DepartmentID) {
  return request({
    url: '/system/departments/' + DepartmentID,
    method: 'delete'
  })
}
